package com.example.productdataserverhystrixdashboard.service;

import cn.hutool.core.thread.ThreadUtil;
import cn.hutool.http.HttpUtil;

public class AccessService {
    public static void main(String[] args) {
        while(true){
            ThreadUtil.sleep(1000);
            try{
                String html= HttpUtil.get("http://127.0.0.1:5001/products");
                System.out.println("html.length="+html.length());
            }catch(Exception e){
                System.err.println(e.getMessage());
            }
            try{
                String html= HttpUtil.get("http://127.0.0.1:5002/products");
                System.out.println("html.length="+html.length());
            }catch(Exception e){
                System.err.println(e.getMessage());
            }
        }
    }
}
